package org.example.project.search.ui

import androidx.compose.foundation.background
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp

/**
 * 代替图片
 */
@Composable
fun Img(size: Dp, onClick: () -> Unit = {}) {
    Box(
        modifier = Modifier
            .size(size)
            .background(Color.Red, shape = RoundedCornerShape(15.dp))
            .clip(RoundedCornerShape(15.dp))
            .clickable { onClick() }
    )
}